package com.demo.application.controller;

import com.demo.application.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: kosam
 */
@RestController
public class StockController {

    @Autowired
    private StockService stockService;

    @PostMapping("/inventoryReduction")
    public String inventoryReduction(@RequestParam("commodityId") Long commodityId) {

        return stockService.inventoryReduction(commodityId);
    }
}
